package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class Notes {
    public static void main(String[] args) throws IOException {
        FileOutputStream fop=new FileOutputStream("Notes.txt",true);
        Scanner scanner=new Scanner(System.in);
        while (true){
            String text=scanner.nextLine();
            if ("exit".equals(text)){
                break;
            }
            byte[] bytes = text.getBytes(StandardCharsets.UTF_8);
            fop.write(bytes);
        }
        fop.close();
        System.out.println("再见");
    }
}
